import { requestClient } from '#/api/request';

// 获取部门树
export async function getDeptTree(data: any = { pid: 0 }) {
  return requestClient.post<any>(
    '/sys/dept/list/tree',
    data,
  );
}

// 新增部门
export const addDepartment = (data: any = {}) => {
  return requestClient.post<any>('/sys/dept/add', data);
};

// 编辑部门
export const editDepartment = (data: any = {}) => {
  return requestClient.post<any>('/sys/dept/update', data);
};
